package com.baturu.vin.gm.dal.dao;

import com.baturu.vin.gm.dal.entity.OptionDescEntity;
import com.baturu.vin.gm.dto.OptionGroupDTO;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface OptionGroupDAO {

    @Select("SELECT id,groupId,optionCode " +
            "FROM gm_option_group")
    List<OptionGroupDTO> findOptionGroup();

    @Select({"<script>",
            "SELECT option_code,description_EN,description_CN FROM gm_epc_cd_optiondesc",
            "WHERE option_code in ",
            "<foreach item = 'item' collection='list' open ='(' separator=',' close = ')'>",
            "#{item}",
            "</foreach>",
            "</script>"})
    List<OptionDescEntity> queryOptionCodeDes(@Param("list") List<String> options);
}
